<?php
$data = array();
/**/
$data[] = array('0.0.0.0', '10001', '192.168.1.20', '8000');
$data[] = array('0.0.0.0', '10002', '192.168.1.20', '9999');
/**/
$content = array();
foreach($data as $item){
    $content[] = implode(' ', $item);
}
header('Content-type: application/octet-stream');
header('Content-Disposition: attachment; filename=rinetd.conf');
echo implode(PHP_EOL, $content);
exit;
?>
